<?php
/**
 * Created by PhpStorm.
 * User: Pico_Dragon
 * Date: 23/12/2014
 * Time: 00:59
 */
include "../../db/dbConnect.php";
?>
<div class="w100p grid friendList">
    <div class="search w100p left ">
        <form id="uSearch">
            <ul class="w100p">
                <li><input type="submit" class="btn" value="Tìm kiếm" /></li>
                <li class="w15p"><input type="text" name="keyword" class="inputSearch w100p" id="keyword" placeholder="Tìm theo tên tài khoản/email..." /> </li>
                <li><select name="address">
                        <option value="0" selected>mọi nơi</option>
                        <?php $frm="select * from QUE_QUAN ORDER BY name";
                                $rel=mysql_query($frm);

                                while($row=mysql_fetch_array($rel)){
                                    echo '<option value='.$row["id"].'>'.$row['name'].'</option>';
                                }
                        ?>
                    </select>
                </li>
                <li><select name="sex">
                        <option value="0" selected>nam-nữ</option>
                        <option value="2">Nam</option>
                        <option value="1" >Nữ</option>

                    </select></li>
                <li><div>Độ tuổi: <input type="text" name="ageFrm" class="input-small w5p" />--<input type="text" name="ageTo" class="w5p input-small"></li>
                <li><label><input type="reset" class="btn" id="resetBtn" value="   " /></label></li>
            </ul>

        </form></div>

        <div id="tbList">

        </div>
</div>
<script type="text/javascript">
    $("#tbList").load("web/member/friendSearch.php");

    $("#uSearch").on('submit', function(e){
        e.preventDefault();
        var data=$(this).serialize();
        $("#tbList").hide().load("web/member/friendSearch.php?"+data).fadeIn();

    })
</script>